package com.justgame.project.service.online.service;

import com.justgame.project.cloud.common.util.ShiroUtils;
import com.justgame.project.service.api.dto.OnlineUserInfoDTO;

import com.justgame.project.service.online.mapper.OnlineUserInfoMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class OnlineUserInfoService {
    private final OnlineUserInfoMapper onlineUserInfoMapper;

    public boolean updateInfo(OnlineUserInfoDTO dto){
        dto.setUserId(ShiroUtils.getUserId());
        return onlineUserInfoMapper.updateById(dto) > 0;
    }
}
